<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>jq</title>
	<script type="text/javascript" src="jquery-1.7.2.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
  			$("p").click(function(){
  			// $(this).css("background-color","red");
   			$(this).hide();     
 			 });

  			$("#hide").click(function(){
  				$("span").hide();
 			 });
  			$("#show").click(function(){
 				 $("span").show();
 			 });

		});

	</script>
</head>
<body>
	<p>我是菜鸟</p>
	<p >你是菜鸟吗？</p>
	<p >是的，你是菜鸟！</p>
	<span id="hide">我要隐身</span>
	<span id="show">我要升级</span>
	<input type="button" value="隐藏">
	<input type="button" value="显示">
</body>
</html>